﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QntPlatform.BinanceApi
{
    public class BinanceError
    {
        public int Code { get; set; }

        public string Msg { get; set; }
        public string Resp { get; set; }

        public string RequestMessage { get; set; }

        public override string ToString()
        {
            return $"{Code}: {Msg}";
        }
    }
    public class BinanceException : SystemException
    {
        BinanceError ErrorDetails { get; set; }
        public BinanceException(string message, BinanceError errorDetails) : base($"{message}:{errorDetails.Resp}")
        {
            ErrorDetails = errorDetails;
        }
    }
}
